<?php 

function getPackage($PackageID){
  // Define the parameters that will be used
  $foo0 = $PackageID;

  // Build the system command that will be called
  $cmd='./GetHostingPackage.pl '.EscapeShellArg($foo0);

  // Execute the shell command
  $returnval = exec($cmd, $output, $result); 

  if ($output[0] == "ErrorCode626") { echo ("A fatal error occured!"); }
  
  else if ($output[0] == "ErrorCode627") { echo ("There is no such package."); }

  else{

  foreach ($output as $X) {
    $s = $X;
    $name = strtok($s, "=");
    $value = strtok("");
    $PackageX[$name] = $value;
  }

  return($PackageX);
}
}

?>
